package models.vo
{
	import org.restfulx.models.RxModel;

	[Resource(name="tramitacoes")]
  
  	[Bindable]
	public class Tramitacao extends RxModel
	{
    	public static const LABEL		:	String = "codigo";
    	
    	public var status				:	String;
    	public var complemento1			:	String;
    	public var complemento2			:	String;
    	public var complemento3			:	String;
    	
    	[DateTime]
    	public var createdAt			:   Date;
    	
    	[BelongsTo]
   	 	public var user					:	User;

		[BelongsTo]
   	 	public var pleito				:	Pleito;		

		//////////////////////////////////////////////////////////////////////////////////////////////////////

    	public function Tramitacao() 
    	{
      		super(LABEL);
    	}
    	
		//////////////////////////////////////////////////////////////////////////////////////////////////////

		public function getUser(): User
		{
			if (!user)
				user = new User();
				
			return user;
		}
    	
	}
}